from multiprocessing.dummy import Process, Queue


class test:
    def __init__(self,a):
        self.a = a

    def print(self):
        print(self.a)
        self.a += 1
 
# t = test('a')
# t.print()
t = test(1)
t.print()


def work(queue):
    # w = queue.get()

    # w.print()
    queue.print()

def work1(queue):
    w = queue.get()

    w.print()

def work2(queue):
    w = queue.get()

    print(id(w))

def work3(aa):
    

    print(id(aa))

queue = Queue()
# p = Process(target=work,args=(t,))

# p = Process(target=work1,args=(queue,))
# p.start()

for _ in range(5):
    p = Process(target=work1,args=(queue,))
    p.start()
    queue.put(t)